<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" 
           %><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"
           %><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"
           %><%@ taglib tagdir="/WEB-INF/tags" prefix="cohesion"
           %>
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<%@ page contentType="text/html;charset=ISO-8859-1"
         %><html:html>
    <head>
        <title><bean:message key="VFacturas.title"/></title>
        <html:base/>
        <%@include file="../header/include.jsp" %>

    </head>
    <body>
        <div id="header"  class="ui-widget-header ui-corner-all">
            <h1><bean:message key="all.title"/></h1>
            <div id="menu">
                <ul id="nav">
                </ul>
            </div>
        </div>
        <div id="body_wrapper">
            <div id="body">
                <div id="split">
                    <div class="top"></div>
                    <div id="left">
                        <div id="content" >
                            ${empty msg ? "" : msg}
                            <% request.setAttribute("_vacio", new Object[0]);%>
                            <div class="fg-toolbar ui-widget-header ui-corner-top">

                                <h1>Facturas</h1>
                            </div>

                            <div  class="ui-widget-content ui-widget">
                                <div style="float: right;margin: 1% 1% 1% 1%; clear: left;">
                                    <ul class="sf_admin_td_actions fg-buttonset fg-buttonset-single">
                                        <cohesion:actor actors="5"><li class="sf_admin_action_usuario"><html:link action="/APreFacturacion.do" styleClass="fg-button-mini fg-button ui-state-default fg-button-icon-left"><span class="ui-icon ui-icon-plus"></span>Nueva Factura</html:link></li></cohesion:actor>
                                    </ul>
                                </div>
                                <div class="list ui-grid-table ui-widget ui-corner-all ui-helper-reset ui-helper-clearfix">
                                    <%--
                                                                    <table id="prueba">

                                    <thead class="ui-widget-header">
                                        <tr>
                                            <th class="ui-state-default ui-th-column"><bean:message key="VFacturas.label0.1"/> RifCedula </th>
                                            <th class="ui-state-default ui-th-column"><bean:message key="VFacturas.label0.6"/> Nombre </th>
                                            <th class="ui-state-default ui-th-column"><bean:message key="VFacturas.label0.4"/> Monto </th>
                                            <th class="ui-state-default ui-th-column">Acciones</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <logic:iterate id="factura" collection="${empty L_Factura ? _vacio : L_Factura}">
                                            <tr class="sf_admin_row ui-widget-content odd">
                                                <td><html:link action="/APreFactura.do" paramId="idFactura" paramName="factura" paramProperty="idFactura">${empty factura.rifCedula ? "Editar" : factura.rifCedula}</html:link></td>
                                                <td>${factura.nombre}</td>
                                                <td>${factura.monto}</td>

                                                <td style="white-space: nowrap;">
                                                    <ul class="sf_admin_td_actions fg-buttonset fg-buttonset-single">

                                                        <li class="sf_admin_action_show"><a class="fg-button-mini fg-button ui-state-default fg-button-icon-left" href="/backend_dev.php/guard/users/2"><span class="ui-icon ui-icon-document"></span>Mostrar</a></li>
                                                        <li class="sf_admin_action_edit"><a class="fg-button-mini fg-button ui-state-default fg-button-icon-left" href="/backend_dev.php/guard/users/2/edit"><span class="ui-icon ui-icon-pencil"></span>Editar</a></li>
                                                        <li class="sf_admin_action_delete"><a class="fg-button-mini fg-button ui-state-default fg-button-icon-left ui-priority-secondary" onclick="if (confirm('Are you sure?')) { var f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(f); f.method = 'post'; f.action = this.href;var m = document.createElement('input'); m.setAttribute('type', 'hidden'); m.setAttribute('name', 'sf_method'); m.setAttribute('value', 'delete'); f.appendChild(m);var m = document.createElement('input'); m.setAttribute('type', 'hidden'); m.setAttribute('name', '_csrf_token'); m.setAttribute('value', '79c49847fd9ab93a19fa964625966a0e'); f.appendChild(m);f.submit(); };return false;" href="/backend_dev.php/guard/users/2"><span class="ui-icon ui-icon-trash"></span>Borrar</a></li>        </ul>
                                                </td> 
                                            </tr>


                                        </logic:iterate>
                                    </tbody>
                                </table>
                                    --%>
                                    <display:table name="L_Factura" requestURI="/APreFacturas.do" pagesize="3"  class="display-tag" htmlId="display-tag" id="factura">

                                        <display:column property="nombre" title="Nombre" sortable="true"/>
                                        <display:column property="rifCedula" title="Rif o Cedula" sortable="true" />
                                        <display:column property="monto" title="Monto" sortable="true" />
                                        <display:column title="Acciones" >

                                            <ul class="sf_admin_td_actions fg-buttonset fg-buttonset-single">
                                                <li class="sf_admin_action_show"><html:link action="/APreFactura.do" paramId="idFactura" paramName="factura" paramProperty="idFactura" styleClass="fg-button-mini fg-button ui-state-default fg-button-icon-left"><span class="ui-icon ui-icon-document"></span>Mostrar</html:link></li>
                                                <li class="sf_admin_action_edit"><html:link action="/APreEditarFactura.do" paramId="idFactura" paramName="factura" paramProperty="idFactura" styleClass="fg-button-mini fg-button ui-state-default fg-button-icon-left"><span class="ui-icon ui-icon-pencil"></span>Editar</html:link></li>
                                                <li class="sf_admin_action_edit"><html:link action="/AEliminarFactura.do" paramId="idFactura" paramName="factura" paramProperty="idFactura" styleClass="fg-button-mini fg-button ui-state-default fg-button-icon-left"><span class="ui-icon ui-icon-trash"></span>Eliminar</html:link></li>
                                            </ul>

                                        </display:column>

                                    </display:table>

                                    <script>
                                        $(document).ready(function() {

                                            $('table.display-tag thead').addClass('ui-widget-header');
                                            $('table.display-tag thead tr th').addClass('ui-state-default ui-th-column');
                                            $('table.display-tag tbody tr').addClass('sf_admin_row ui-widget-content odd');

                                        

                                        });
                                    </script>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div id="right">


                        <%@include file="../administrador/VMenuAdmin.jsp" %>



                    </div>

                    <div class="clearer ui-helper-clearfix"></div>
                    <div class="bottom"></div>
                </div>
                <div class="clearer"></div>
            </div>
            <div class="clearer"></div>
        </div>
        <div id="end_body"></div>
<div id="footer"> <%@include file="/footer/include.jsp" %> </div>
    </body>
</html:html>